home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / cc1.68k / RCS / utils.mk,v < prev   
Encoding:
Text File  |  1991-05-23  |  2.8 KB  |  128 lines

  1. head     1.3;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.3
  10. date     91.05.23.12.46.18;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.2;
  13.  
  14. 1.2
  15. date     89.12.14.17.23.09;  author rab;  state Exp;
  16. branches ;
  17. next     1.1;
  18.  
  19. 1.1
  20. date     89.09.26.16.06.27;  author rab;  state Exp;
  21. branches ;
  22. next     ;
  23.  
  24.  
  25. desc
  26. @@
  27.  
  28.  
  29. 1.3
  30. log
  31. @Delete a target before compiling it.  Also, remove .def files from
  32. .ALLSRC.
  33. @
  34. text
  35. @#
  36. # This Makefile is a special one for the cc1 program (the main portion of
  37. # the GNU C compiler).  The purpose of this Makefile is to generate
  38. # executable copies of several utility programs, which are then used
  39. # to generate source files for the compiler from a description of the
  40. # machine for which the compiler is to generate code.  This Makefile
  41. # must be separate from the main Makefile, and must be processed in
  42. # a separate invocation of Pmake, because its target machine must be
  43. # the machine on which we're executing now, not the machine on which
  44. # the compiler is to execute.
  45. #
  46.  
  47. MACHINES     = $(TM)
  48. SRCDIR        ?= ../cc/dist
  49. TM        ?= sun3
  50. CC        = cc
  51. LIBS        ?=
  52. XCFLAGS        ?=
  53.  
  54. .PATH.h        :
  55. .PATH.h        : ../gcc/sprite $(SRCDIR) /sprite/lib/include \
  56.             /sprite/lib/include/$(TM).md
  57.  
  58. #include    <tm.mk>
  59. CFLAGS         = -g -O $(TMCFLAGS) -I. $(.INCLUDES) $(XCFLAGS)
  60.  
  61. all        : $(TM).md/genconfig $(TM).md/genflags $(TM).md/gencodes \
  62.             $(TM).md/genemit $(TM).md/genrecog \
  63.             $(TM).md/genextract $(TM).md/genpeep \
  64.             $(TM).md/genoutput
  65. #
  66. # The targets below are for a bunch of utility programs used to generate
  67. # C files for machine-dependent aspects of the compiler.  Things are a
  68. # little tricky here:  these programs have to be generated to run on
  69. # the current machine ($MACHINE).
  70. #
  71.  
  72. MAKEGEN:    .USE $(TM).md/rtl.o $(TM).md/obstack.o $(LIBS)
  73.     $(RM) -f $(.TARGET)
  74.     $(CC) $(CFLAGS) -o $(.TARGET) $(.ALLSRC:N*.h:N*.def)
  75.  
  76. $(TM).md/genconfig        : $(SRCDIR)/genconfig.c MAKEGEN
  77. $(TM).md/genflags        : $(SRCDIR)/genflags.c MAKEGEN
  78. $(TM).md/gencodes        : $(SRCDIR)/gencodes.c MAKEGEN
  79. $(TM).md/genemit        : $(SRCDIR)/genemit.c MAKEGEN
  80. $(TM).md/genrecog        : $(SRCDIR)/genrecog.c MAKEGEN
  81. $(TM).md/genextract        : $(SRCDIR)/genextract.c MAKEGEN
  82. $(TM).md/genpeep        : $(SRCDIR)/genpeep.c MAKEGEN
  83. $(TM).md/genoutput        : $(SRCDIR)/genoutput.c MAKEGEN
  84.  
  85. #
  86. # Targets to generate the .o files that must be linked with the files
  87. # above.
  88.  
  89. MAKEOBJ:    .USE
  90.     $(RM) -f $(.TARGET)
  91.     $(CC) $(CFLAGS) -c -o $(.TARGET) $(.ALLSRC:N*.h:N*.def)
  92.  
  93. $(TM).md/obstack.o        : obstack.c MAKEOBJ
  94. $(TM).md/rtl.o            : rtl.c MAKEOBJ
  95.  
  96. #if exists($(TM).md/dependencies.mk)
  97. #include    "$(TM).md/dependencies.mk"
  98. #endif
  99. @
  100.  
  101.  
  102. 1.2
  103. log
  104. @Fixed ALLSRC to not include *.h.
  105. @
  106. text
  107. @d39 2
  108. a40 1
  109.     $(CC) $(CFLAGS) -o $(.TARGET) $(.ALLSRC:N*.h)
  110. d56 2
  111. a57 1
  112.     $(CC) $(CFLAGS) -c -o $(.TARGET) $(.ALLSRC:N*.h)
  113. @
  114.  
  115.  
  116. 1.1
  117. log
  118. @Initial revision
  119. @
  120. text
  121. @d39 1
  122. a39 1
  123.     $(CC) $(CFLAGS) -o $(.TARGET) $(.ALLSRC)
  124. d55 1
  125. a55 1
  126.     $(CC) $(CFLAGS) -c -o $(.TARGET) $(.ALLSRC)
  127. @
  128.